var express = require('express'),
    router = express.Router(),
    tool = require('../utils/common'),
    adModel = require('../db/model/ad');

/**
 * 获取顶部广告
 */
router.post('/getIndexTop', (req, res) => {
    let model = new adModel();
    model.list({position_id: model.POSI_ID_WAP_INDEX_TOP}).then(result => {
        res.json(tool.returnArray(result, 1));
    }).catch(e => res.json(tool.returnArray(e)));
});

module.exports = router;